package com.tedu._01mvcboot01.controller;

import com.tedu._01mvcboot01.pojo.dto.VehicleAddDTO;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

@Controller
public class VehicleController {
    @RequestMapping("v1/vehicle/add1")
    @ResponseBody
    public String add1( String brand,String model,Integer price){
        return brand+"-"+model+"-"+price;
    }
    @RequestMapping("v1/vehicle/add2")
    @ResponseBody
    public String add2(VehicleAddDTO vehicleAddDTO){
        String brand = vehicleAddDTO.getBrand();
        String model = vehicleAddDTO.getModel();
        Integer price = vehicleAddDTO.getPrice();
        return brand+"-"+model+"-"+price;
    }
}
